/*
 * win_func.h
 *
 *  Created on: 2017
 *      Author: Anmali
 */

#ifndef WIN_FUNC_H_
#define WIN_FUNC_H_
/* ----------------------------------------------------------------------
** the rectangular window function
** flag:0:bypass  other:rectangular window
** len:the length of input data array x_in
** win_width:the width of rectangular window
** begin_loc:the begin loc of rectangular window
** x_in:input data array
** x_out:output data array
** ------------------------------------------------------------------- */
void rectangular(uint8_t flag, uint32_t len, uint32_t win_width, uint32_t begin_loc,
						float* x_in, float* x_out);
/* ----------------------------------------------------------------------
** the hanning window function
** flag:0:bypass  other:hanning window
** len:the length of input data array x_in
** x_in:input data array
** x_out:output data array
** ------------------------------------------------------------------- */
void hanning(uint8_t flag, uint32_t len, float *x_in, float *x_out);

/* ----------------------------------------------------------------------
** the hamming window function
** flag:0:bypass  other:hanning window
** len:the length of input data array x_in
** x_in:input data array
** x_out:output data array
** ------------------------------------------------------------------- */
void hamming(uint8_t flag, uint32_t len, float* x_in, float* x_out);

#endif /* WIN_FUNC_H_ */
